import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const state = {
    count: 10,
    name: '起飞',
    threeUrlprefix:'',///zhongda
    menuList: [],
    masterId: '',
    roleId: '',
    loginData: {},
    isAble: '',
    formSign: '',
    labelValues: [ //业主的导出数据字段
        {
            label: '项目',
            prop: 'xqName'
        },
        {
            label: '区域',
            prop: 'sectionName'
        },
        {
            label: '房间名称',
            prop: 'houseName'
        },
        {
            label: '姓名',
            prop: 'name'
        },
        {
            label: '性别',
            prop: 'sexStr'
        },
        {
            label: '人员类型',
            prop: 'userTypeStr'
        },
        {
            label: '与业主关系',
            prop: 'relation'
        },
        {
            label: '居住类型',
            prop: 'liveTypeStr'
        },
        {
            label: '常住/暂住',
            prop: 'resideStr'
        },
        {
            label: '手机号',
            prop: 'phone'
        },
        {
            label: '证件类型',
            prop: 'idNumberTypeStr'
        },
        {
            label: '证件号码',
            prop: 'idNumber'
        },
        {
            label: '年龄',
            prop: 'age'
        },
        {
            label: '入住时间',
            prop: 'startTimeStr'
        },
        {
            label: '户籍地址',
            prop: 'address'
        },
        {
            label: '政治面貌',
            prop: 'politicalStr'
        },
        {
            label: '邮箱',
            prop: 'email'
        },
        {
            label: '紧急联系人',
            prop: 'emergencyName'
        },
        {
            label: '紧急联系电话',
            prop: 'emergencyPhone'
        },
        {
            label: '是否外籍',
            prop: 'isForeignStr'
        },
        {
            label: '国籍',
            prop: 'nationality'
        },
        {
            label: '籍贯',
            prop: 'censusRegister'
        },
        {
            label: '民族',
            prop: 'nation'
        },
        {
            label: '生日',
            prop: 'birthdayStr'
        },
        {
            label: '婚姻状况',
            prop: 'maritalStatusStr'
        },
        {
            label: '学历',
            prop: 'education'
        },
        {
            label: '职业',
            prop: 'career'
        },
        {
            label: '工作单位',
            prop: 'workUnit'
        },
        {
            label: '单位地址',
            prop: 'workUnitAddress'
        },
        {
            label: '单位电话',
            prop: 'workUnitPhone'
        },
        {
            label: '备注',
            prop: 'remark'
        }
    ],
    labelHouse: [{ //
            label: '房屋编码',
            prop: 'financialCode',
        },
        {
            label: '项目',
            prop: 'xqName',
        },
        {
            label: '区域',
            prop: 'sectionName',
        },
        {
            label: '房号',
            prop: 'houseNum',
        },
        {
            label: '房屋类型',
            prop: 'houseTypeStr',
        },
        {
            label: '建筑面积',
            prop: 'areaStr',
        },
        {
            label: '公摊面积',
            prop: 'shareAreaStr',
        },
        {
            label: '使用面积',
            prop: 'useAreaStr',
        }
    ],
    labelyuangong: [ //导出员工信息
        {
            label: '员工编码',
            prop: 'id',
        },
        {
            label: '姓名',
            prop: 'name',
        },
        {
            label: '手机号',
            prop: 'mobile',
        },
        {
            label: '证件类型',
            prop: 'idNumberTypeStr',
        },
        {
            label: '证件号码',
            prop: 'idNumber',
        },
        {
            label: '性别',
            prop: 'sexStr',
        },
        {
            label: '年龄',
            prop: 'age',
        },
        {
            label: '入职时间',
            prop: 'gmtCreate',
        },
        {
            label: '公司',
            prop: 'companyName',
        },
        {
            label: '部门',
            prop: 'orgName',
        },
        {
            label: '职位',
            prop: 'position',
        },
        {
            label: '邮箱',
            prop: 'email',
        },
        {
            label: '住址',
            prop: 'address',
        },
        {
            label: '户籍地址',
            prop: 'censusRegister',
        },
        {
            label: '民族',
            prop: 'nation',
        },
        {
            label: '生日',
            prop: 'birthday',
        },
        {
            label: '婚姻状况',
            prop: 'maritalStatusStr',
        },
        {
            label: '学历',
            prop: 'education',
        },
        {
            label: '备注',
            prop: 'remark',
        },
    ],
    labelzuhu: [ //导出租户信息
        {
            label: '项目',
            prop: 'xqName'
        },
        {
            label: '区域',
            prop: 'sectionName'
        },
        {
            label: '房间名称',
            prop: 'houseName'
        },
        {
            label: '姓名',
            prop: 'tenant'
        },
        {
            label: '性别',
            prop: 'sexStr'
        },
        {
            label: '人员类型',
            prop: 'isLeaseStr'
        },
        {
            label: '与租户承租人关系',
            prop: 'relation'
        },
        {
            label: '居住类型',
            prop: 'liveTypeStr'
        },
        {
            label: '手机号',
            prop: 'phone'
        },
        {
            label: '证件类型',
            prop: 'idNumberTypeStr'
        },
        {
            label: '证件号码',
            prop: 'idNumber'
        },
        {
            label: '年龄',
            prop: 'age'
        },
        {
            label: '入住时间',
            prop: 'startTimeStr'
        },
        {
            label: '周期',
            prop: 'leaseTime'
        },
        {
            label: '户籍地址',
            prop: 'censusRegister'
        },
        {
            label: '政治面貌',
            prop: 'politicalStr'
        },
        {
            label: '邮箱',
            prop: 'email'
        },
        {
            label: '紧急联系人',
            prop: 'emergencyName'
        },
        {
            label: '紧急联系电话',
            prop: 'emergencyPhone'
        },
        {
            label: '是否外籍',
            prop: 'isForeignStr'
        },
        {
            label: '国籍',
            prop: 'nationality'
        },
        {
            label: '民族',
            prop: 'nation'
        },
        {
            label: '生日',
            prop: 'birthday'
        },
        {
            label: '婚姻状况',
            prop: 'maritalStatus'
        },
        {
            label: '学历',
            prop: 'education'
        },
        {
            label: '职业',
            prop: 'career'
        },
        {
            label: '工作单位',
            prop: 'workUnit'
        },
        {
            label: '单位地址',
            prop: 'workUnitAddress'
        },
        {
            label: '单位电话',
            prop: 'workUnitPhone'
        },
        {
            label: '备注',
            prop: 'remark'
        }
    ],
    labelBill: [{
            label: '编号',
            prop: 'id'
        },
        {
            label: '项目名称',
            prop: 'xqName'
        },
        {
            label: '区域名称',
            prop: 'sectionName'
        },
        {
            label: '房间',
            prop: 'houseNum'
        },
        {
            label: '账单金额',
            prop: 'amount'
        },
        {
            label: '缴费项',
            prop: 'costName'
        },
        {
            label: '缴费周期',
            prop: 'cycleStr'
        },
        {
            label: '账单生成',
            prop: 'generaWayStr'
        },
        {
            label: '支付状态',
            prop: 'payStatusStr'
        },
        {
            label: '催缴次数',
            prop: 'pushCount'
        },
        {
            label: '通知',
            prop: 'notifyStr'
        },
        {
            label: '是否作废',
            prop: 'isCancelStr'
        },
        {
            label: '账单起始时间',
            prop: 'startPaymentStr'
        },
        {
            label: '账单结束时间',
            prop: 'endPaymentStr'
        },
        {
            label: '支付人员',
            prop: 'payUser'
        },
        {
            label: '支付时间',
            prop: 'payTimeStr'
        },
        {
            label: '创建时间',
            prop: 'gmtCreateStr'
        },
        {
            label: '创建人',
            prop: 'creator'
        }, {
            label: '备注',
            prop: 'remark'
        },
    ],
    voteLabel: [{
            label: '标题',
            prop: 'name'
        },
        {
            label: '创建人',
            prop: 'nickName'
        },
        {
            label: '创建人手机号',
            prop: 'phone'
        },
        {
            label: '状态',
            prop: 'statusName'
        },
        {
            label: '创建时间',
            prop: 'gmtCreate'
        },
        {
            label: '截止时间',
            prop: 'deadline'
        },
        {
            label: '撤回时间',
            prop: 'gmtModified'
        }
    ],
    voteDetailLabel: [{
            label: '投票标题',
            prop: 'name'
        },
        {
            label: '状态',
            prop: 'statusName'
        },
        {
            label: '总投票人',
            prop: 'sum'
        },
        {
            label: '总票数',
            prop: 'number'
        },
        {
            label: '截止时间',
            prop: 'deadline'
        },
        {
            label: '创建时间',
            prop: 'gmtCreate'
        },
        {
            label: '创建人',
            prop: 'nickName'
        },
        {
            label: '创建人手机号',
            prop: 'phone'
        },
        {
            label: '比率',
            prop: 'percentage'
        },
        {
            label: '票数',
            prop: 'poll'
        },

    ],
    statistician:true,
    moduleData:{
        status:false,
        id:null
    },
    moduleHomeData:{
        status:false,
        id:null
    }
}
const mutations = {
    changeModuleData(state,value){
        state.moduleData = value;
    },
    changeHomeModuleData(state,value){
        state.moduleHomeData = value;
    },

    changeStatistician(state,value){
        state.statistician = value;
    },
    increment() { //提交的方法
        state.count++
            //console.log(state.count, state.name)
    },
    getLoginData() { //将登陆信息存储到本地
        let strData = JSON.stringify(state.loginData)
        sessionStorage('loginData', strData)
    },
    isAble(state, value) {
        state.isAble = value
    },
    formSign(state, value) {
        state.formSign = value
    }
}
const getters = { //设置的计算
    doneTodosCount: state => {
        //console.log(state)
    }
}
const actions = { //Action 函数接受一个与 store 实例具有相同方法和属性的 context 对象，因此你可以调用 context.commit 提交一个 mutation，或者通过 context.state 和 context.getters 来获取 state 和 getters。
    increment(context) {
        context.commit('increment')
    }
}
export default new Vuex.Store({
    state,
    mutations,
    getters,
    actions
})